import React from "react";
import { createRoot } from "react-dom/client"
import App from "./App";
import { api_common } from "./apis";
import { dispatch } from "./store";

const root = createRoot(document.getElementById("app") as HTMLElement);
api_common.loginUser().then(res => {
    dispatch(state => ({
        ...state,
        loginUser: res.user,
    }))
    root.render(<App />);
})
